CS 211 Lesson 22

Structure Arrays

Quote:

You have not lived a perfect day, even though you have earned your money, unless you have done something for someone who will never be able to repay you. Ruth Schmeltzer

Lesson Objectives:

Lesson:

I. MATLAB Concepts

A. Introduction to non-homogeneous arrays (a review from last lesson)

B. Overview of structures

Field Name Field Value
Social 123456789
Year 2009
First_name John
Last_name Doe
Squadron 13

This related data can be stored in a single structure using the following MATLAB statements:

Cadet.Social     = '123456789';
Cadet.Year       = 2009;
Cadet.First_name = 'John';
Cadet.Last_name  = 'Doe';
Cadet.Squadron   = 13;

C. Overview of structure arrays

D. Accessing values stored in structure arrays

E. Advanced structure array concepts (optional material that will never be tested on a GR)

II. Good Programming Practices

III. Algorithms

Lab Work: Lab 22

References:  Chapman Textbook: section 7.3